home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1998 January / CT_SW9801.ISO / pc / software / dateiman / diskutil / cdfinder.sit / CDFinder 2.1 / CDFinder & AppleScript < prev    next >
Text File  |  1997-08-18  |  1KB  |  29 lines

  1. --  This is a short sample how to tell CDFinder to create catalog files of all local disks
  2. --  By Norbert M. Doerner 1997
  3.  
  4. tell application "Finder"
  5.     set volumeList to every disk as list
  6. end tell
  7.  
  8. tell application "CDFinder"
  9.     repeat with oneDisk in volumeList
  10.         set oneAlias to oneDisk as alias --  CDFinder needs an alias of the disk
  11.         with timeout of 500 seconds --  remember: this might take more than the two minutes!
  12.             set myResult to create catalog of (oneAlias) --  use standard settings and do not update or duplicate
  13.         end timeout
  14.         if myResult = -128 then -- then the catalog might be already there
  15.         end if
  16.     end repeat
  17. end tell
  18.  
  19. --  PLEASE NOTE:
  20. --  This is the first release of CDFinder with some AppleScript support. Once I have figured out
  21. --  how to add more stuff (like a real object hierarchy) I will add more options.
  22. --  If you have any ideas or suggestions or even better, code samples, please tell me!
  23.  
  24. --  Secret commands:
  25. --  By opening the preferences file, CDFinder will open the window to let you change the preferences.
  26. --  By opening any catalog file that is stored inside the catalog folder, CDFinder will open it
  27. --    and display its contents.
  28. --  These secret commands will go away once I figure out how to use properties and the 
  29. --   get/set data commands.